﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using BUS;
using DTO;
namespace careervn
{
   
    public partial class Form1 : Form
    {
        
        public Form1()
        {
            
            InitializeComponent();
        }

        private void comboTree1_TextChanged(object sender, EventArgs e)
        {

        }

        private void labelX1_Click(object sender, EventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            DataTable dt1= new DataTable();
            dt1 = Nganh_BUS.DanhSachNganh();

            
           comboBoxEx1.DataSource =dt1;
      
           comboBoxEx1.DisplayMember = "ten_nganh";
           comboBoxEx1.ValueMember = "id_nganh";
          // dt2 = NhanVien_BUS.DanhSachNhanVienTheoMa();

        }


        private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e)
        {
           DataTable dt2 = new DataTable();
            dt2 = NhanVien_BUS.DanhSachNhanVienTheoNganh(comboBoxEx1.SelectedValue.ToString());
            comboBoxEx2.DataSource = dt2;

            comboBoxEx2.DisplayMember = "name_nhanvien";
            comboBoxEx2.ValueMember = "id_nhanvien";
        }

        private void comboBoxEx2_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable dt3 = new DataTable();
            dt3 = ChiTietPhongVan_BUS.ctpv_load(comboBoxEx2.SelectedValue.ToString());
            dataGridViewX1.DataSource = dt3;
        }
    }
}
